/*
 * EmployeeAemFinder.h
 *
 *  Created on: 20 ��� 2010
 *      Author: Sartios
 */

#ifndef EMPLOYEEAEMDBFINDER_H_
#define EMPLOYEEAEMDBFINDER_H_

#include "IEmployeeAemDbFinder.h"

/**
 * DAO class which finds the next valid aem from the database
 */
class EmployeeAemDbFinder : public IEmployeeAemDbFinder {
public:
	/**
	 * Connects to database with the defaule values from DbElementProvider
	 * \throw if can't connect
	 */
	EmployeeAemDbFinder();
	/**
	 * Connects to database using the given parameters
	 * \param string *, database name
	 * \param string *, database owner username
	 * \param string *, database owner password
	 */
	EmployeeAemDbFinder(const string *dbName,const string *username,const string *password);
	/**
	 * Does nothing
	 */
	virtual ~EmployeeAemDbFinder();
	/**
	 * Gets the stmtHandle and executes a statement wich returns the last aem from database.
	 * Increases the aem plus 1 and returns it
	 * \return string *,the next valid employee aem
	 */
	virtual string	*	getNextValidAem()const;
};

#endif /* EMPLOYEEAEMFINDER_H_ */
